import { http } from '@/utils/http/axios';

/**
 * @description: 获取列表
 */
export function list(params) {
    return http.request({
        url: '/article/list',
        method: 'GET',
        params
    });
}

/**
 * @description: 详情
 */
export function info(params) {
    return http.request({
        url: '/article/info',
        method: 'GET',
        params
    });
}

/**
 * 新增
 */
export function add(params) {
    return http.request({
        url: '/article/add',
        method: 'POST',
        params
    })
}

/**
 * 编辑
 */
export function edit(params) {
    return http.request({
        url: '/article/edit',
        method: 'POST',
        params
    })
}

/**
 * 删除
 */
export function Del(params) {
    return http.request({
        url: '/article/delete',
        method: 'POST',
        params
    })
}

//系统公告

/**
 * @description: 获取列表
 */
export function xlist(params) {
    return http.request({
        url: '/article/xlist',
        method: 'GET',
        params
    });
}

/**
 * @description: 详情
 */
export function xinfo(params) {
    return http.request({
        url: '/article/xinfo',
        method: 'GET',
        params
    });
}

/**
 * 新增
 */
export function xadd(params) {
    return http.request({
        url: '/article/xadd',
        method: 'POST',
        params
    })
}

/**
 * 编辑
 */
export function xedit(params) {
    return http.request({
        url: '/article/xedit',
        method: 'POST',
        params
    })
}

/**
 * 删除
 */
export function xDel(params) {
    return http.request({
        url: '/article/xdelete',
        method: 'POST',
        params
    })
}


/**
 * @description: 获取分类列表
 */
export function TreeList(params) {
    return http.request({
        url: '/article/category',
        method: 'GET',
        params
    });
}

/**
 * 新增
 */
export function categoryadd(params) {
    return http.request({
        url: '/article/categoryadd',
        method: 'POST',
        params
    })
}

/**
 * 编辑
 */
export function categoryedit(params) {
    return http.request({
        url: '/article/categoryedit',
        method: 'POST',
        params
    })
}

/**
 * @description: 详情
 */
export function categoryinfo(params) {
    return http.request({
        url: '/article/categoryinfo',
        method: 'GET',
        params
    });
}
